package com.naszetatry.registration;

import java.util.Random;

/**
 * 
 * @author Maciej Koch
 *
 */
public class RValidation {

	//registration
	public boolean isLoginValid = true;
	public boolean isLoginUnused = true;
	public boolean isPasswordValid = true;
	public boolean isPasswordMatch = true;
	public boolean isMailValid = true;
	public boolean isMailUnused = true;
	public boolean isRegulationAccepted = true;
	public boolean isPasswordChangedCorrectly = false;
	
	public boolean isPasswordMatch(String pass1, String pass2)
	{
		if(pass1 == null) return false;
		if(pass1.equals(pass2)) return true;
		return false;
	}
	public boolean isRegulationAccepted(String reg)
	{
		if(reg == null) return false;
		return true;
	}
	public String generateActivationKey()
	{
		Random r = new Random();	
		return String.valueOf(Math.abs(r.nextLong()));	
	}
}
